import request from '@/utils/request'

/** 获取列表数据 */
export const getActivityApi = (data) => {
  return request({
    url: '/activity/pageConditionQueryByCreatorId',
    method: 'POST',
    data
  })
}

/** 删除 */
export const delActivityApi = (data) => {
  return request({
    url: '/activity/batchDeleteActivity',
    method: 'POST',
    data
  })
}


/**
 * 创建活动和修改活动
 * 修改活动要传递一个参数
 * activityBasicId
 * */
export const activityApi = (data) => {
  return  request({
    url: '/activity/addActivity',
    method: 'POST',
    data
  })
}


/** 获取地区 */
export const getRegionApi = (data) => {
  return request({
    url: '/address/queryAddressForFourLinkage',
    method: 'POST',
    data
  })
}
/**
 * 保存草稿 和 修改草稿
 */
export const saveDraftsApi = (data) => {
  return request({
    url: '/activity/saveDrafts',
    method: 'POST',
    data
  })
}

/** 活动详情根据id得到当前数据详情 */
export const editActivityApi = (data) => {
  return request({
    url: '/activity/queryByUpdate',
    method: 'POST',
    data
  })
}